package com.laixu.estore.service;

import com.laixu.estore.bean.vo.CategoryTreeVo;
import com.laixu.estore.dao.CategoryDao;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
@Slf4j // 日志
public class CategoryService {
    private final CategoryDao categoryDao;
    public List<CategoryTreeVo> list() {
        List<CategoryTreeVo> list = categoryDao.findCategoryTreeVo();
        log.info("树分类信息：{}",list);
        // service调用dao
        return list;
    }
}